package org.example.Controller;

import org.example.Pojo.Delivery;
import org.example.Service.Impl.DeliverServiceImpl;
import org.example.Utils.RequirePermission;
import org.example.Utils.UnionResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/DeliveryInfo")
public class DeliveryInfoController {
    @Autowired
    DeliverServiceImpl deliverServiceImpl;
    @RequirePermission(value = "m:delivery")
    @RequestMapping("/add")
    public UnionResult add(Delivery delivery) {
        return deliverServiceImpl.addDeliveryInfo(delivery);
    }
    @RequestMapping("/query")
    public UnionResult query(String orderid,String addressid) {
        return deliverServiceImpl.GetDeliveryInfo(orderid,addressid);
    }
}
